package com.yh.csx.crm.core.enums;

/**
 * ApprovalFlowEnum class
 *
 * @author huyalin
 * @date 2019/2/22
 */
public enum ApprovalFlowEnum {
    BEGIN("1001", "发起审批"),
    COMPLETE("2001", "完成");

    private String code;
    private String name;

    ApprovalFlowEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ApprovalFlowEnum get(String code) {
        for (ApprovalFlowEnum approvalFlowEnum: ApprovalFlowEnum.values()) {
            if (approvalFlowEnum.code.equals(code)) {
                return approvalFlowEnum;
            }
        }
        return null;
    }
}
